# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This package contains the interfaces, structs, and enums to be used in PINs NSF tests.

package(
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],
)

cc_library(
    name = "testbed",
    testonly = True,
    hdrs = ["testbed.h"],
    deps = [
        "//gutil/gutil:overload",
        "//thinkit:generic_testbed",
        "//thinkit:generic_testbed_fixture",
        "//thinkit:mirror_testbed",
        "//thinkit:mirror_testbed_fixture",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
    ],
)

cc_library(
    name = "flow_programmer",
    testonly = True,
    hdrs = ["flow_programmer.h"],
    deps = [
        ":image_config_params",
        ":testbed",
        "//thinkit:ssh_client",
        "@com_github_p4lang_p4runtime//:p4info_cc_proto",
        "@com_google_absl//absl/status",
    ],
)

cc_library(
    name = "traffic_helper",
    testonly = True,
    hdrs = ["traffic_helper.h"],
    deps = [
        ":testbed",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings:string_view",
        "@com_google_absl//absl/time",
    ],
)

cc_library(
    name = "component_validator",
    testonly = True,
    hdrs = ["component_validator.h"],
    deps = [
        ":testbed",
        "//thinkit:ssh_client",
        "@com_github_google_glog//:glog",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings:string_view",
    ],
)

cc_library(
    name = "image_config_params",
    hdrs = ["image_config_params.h"],
    deps = [
        "@com_github_p4lang_p4runtime//:p4info_cc_proto",
        "@com_google_absl//absl/time",
    ],
)

cc_library(
    name = "scenario",
    hdrs = ["scenario.h"],
)

cc_library(
    name = "test_params",
    testonly = True,
    hdrs = ["test_params.h"],
    deps = [
        ":component_validator",
        ":flow_programmer",
        ":image_config_params",
        ":scenario",
        ":testbed",
        ":traffic_helper",
        "//thinkit:ssh_client",
    ],
)
